Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jjve

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jjve

Render JJV errors

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-94.15%
Maintainers
1
Weekly downloads
 
Created
Source

JJV Errors (jjve) Build Status

This is a library to render JJV validation output.

Usage

var jjv = require('jjv');
var jjve = require('jjve');

var env = jjv();
var je = jjve(env);

var schema = {
  type: 'object',
  properties: { ok: { type: 'boolean' } },
};

var data = { ok: 1 };

var result = env.validate(schema, data);

if (result) {
  var errors = je(schema, data, result);
  console.log(JSON.stringify(errors, null, 4));
}

Output

[
    {
        "code": "INVALID_TYPE",
        "message": "Invalid type: integer should be boolean",
        "data": 1,
        "path": "$.ok"
    }
]

License

This work is licensed under the MIT License (see the LICENSE file).

Error messages derived from z-schema (see the NOTICE file).

Keywords

FAQs

Package last updated on 23 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc